{% extends "VavilenFirstBundle::layout.html.twig" %}

{% block title %} - home page{% endblock %}

{% block admin_nav %}
    {% for category in categoriesTree %}
        <div>{{ category.id }}</div>
    {% endfor %}
{% endblock %}

{% block content %}
    <div>
        {# sorting of properties based on query components #}
        {#<th>{{ pagination.sortable('Id', 'a.id')|raw }}</th>#}
        {#<th{% if pagination.isSorted('a.Title') %} class="sorted"{% endif %}>{{ pagination.sortable('Title', 'a.title')|raw }}</th>#}
    </div>
    {% for article in pagination %}
        <div {% if loop.index is odd %}class="color"{% endif %}>
            <div class="title"><a href="#">{{ article.title }}</a></div>
            <div class="description">{{ article.description }}</div>
            <div class="content">{{ article.content }}</div>
            <div class="tags">
                {% for tag in article.tags %}
                    <span><a href="#">{{ tag.tagName }}</a>, </span>
                {% endfor %}
            </div>
        </div>
    {% endfor %}
    <div class="navigation">
        {{ pagination.render()|raw }}
    </div>
{% endblock %}



